package clinic.ms.mapper;

import clinic.ms.entity.Admin;
import clinic.ms.entity.Item;
import clinic.ms.entity.Patient;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@Mapper
public interface AdminMapper {
/*
    Admin queryAdByName(@Param("userName") String userName);

    void save(Admin admin);
    void delete(String userName);
    void update(Admin admin);
    List<Admin> findAll();

 */

    int deleteAdByName(String userName) throws Exception;
    Admin queryAdByName(@Param("userName") String userName);
    ArrayList<Admin> queryAdByNames(@Param("userName") String userName);
    int insertAdmin(@Param("admin") Admin admin);
    int updateAdByName(@Param("admin") Admin admin);
}